how to get a byte[] representation from a IP in String form in Java

Posted by Manuel on Stack Overflow See other posts from Stack Overflow or by Manuel
Published on 2010-06-06T14:49:00Z Indexed on 2010/06/06 14:52 UTC
Read the original article Hit count: 163

Filed under:
|
|
|

Suppose I have the IP stored in a String:

String ip = "192.168.2.1"

and I want to get the byte array with the four ints. How can I do it? Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about conversion